package hello;

import java.util.Random;

public class Case3 {
    public static void main(String[] args) {
        Random random = new Random();
        int a = random.nextInt(100);
        if (a % 2 == 0) {
            System.out.println(a + "是偶数");
        } else {
            System.out.println(a + "是奇数");
        }
        String str = "AWEGFAWEG";
        System.out.println(str.toLowerCase());
        String sqq = "awegfwea";
        System.out.println(sqq.toUpperCase());

        String str1 = "qwertyu";
        String str2 = "qweasdf";
        String r = str1.substring(0, 3);
        System.out.println(r);
        String s = str2.substring(0, 3);
        if (r.equals(s)) {
            System.out.println("两个字符串相同");
        } else {
            System.out.println("两个字符串并不相同");
        }
    }
}
